package arithmetic1.test1;

import java.util.Scanner;

public class G {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        String str=scanner.nextLine();
        String strs[]=str.split("[ ]");
        int a=Integer.parseInt(strs[0]);
        int b=Integer.parseInt(strs[1]);
        if(a>=10000 || a<=-10000 || b>=10000 || b<=-10000){
            throw new RuntimeException("请输入-10000到10000之间的数");
        }
        int num1=a/b;
        int num2=0;
        if(a%b!=0){
            num2=a-(num1*b);
        }
        System.out.println(num1+" "+num2);
    }
}
